
<!-- 绑定标签的模板 -->
<script type="text/template" id="bindTagTemplate">
    <div class="card btn-line-height">
        <div class="split-title top-offset-1">
            <span>系统标签</span>
            <div class="float-right">
                <a href="{{_server_home}}/note/taglist">查看</a>
            </div>
        </div>

        <div class="row">
            {{! each globalTagList tag }}
            <a class="tag lightgray for-dialog large bind  {{! selectedNames.indexOf(tag.tag_code)>=0 ? "active":"" }}" 
                data-code="{{!tag.tag_code}}" onclick="xnote.action.note.onTagClick(this);">
                {{! tag.tag_name }}
            </a>
            {{!/each}}
        </div>
        
        <div class="split-title top-offset-1">
            <span>推荐标签</span>
            <div class="float-right">
                <a href="{{! manageLink }}">管理</a>
            </div>
        </div>

        <div class="row">
            {{! each tagList tag }}
            <a class="tag lightgray for-dialog large bind {{! selectedNames.indexOf(tag.tag_name)>=0 ? "active":"" }}" 
                data-id="{{!tag._id}}" data-code="{{!tag.tag_code}}" onclick="xnote.action.note.onTagClick(this);">
                {{! tag.tag_name }}
            </a>
            {{!/each}}

            {{! if tagList.length == 0 }}
                <span>暂无标签</span>
            {{!/if}}

        </div>

        <div class="split-title top-offset-1">
            <span>全部标签</span>
            <div class="float-right">
                <a href="{{_server_home}}/note/taglist">查看</a>
            </div>
        </div>

        <div class="row">
            {{! each allTagList tag }}
            <a class="tag lightgray for-dialog large bind {{! selectedNames.indexOf(tag.tag_name)>=0 ? "active":"" }}" 
                data-id="{{!tag._id}}" data-code="{{!tag.tag_name}}" onclick="xnote.action.note.onTagClick(this);">
                {{! tag.tag_name }}
            </a>
            {{!/each}}

            {{! if allTagList.length == 0 }}
                <span>暂无标签</span>
            {{!/if}}
        </div>
    </div>
</script>